import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: require('@/views/login/login').default
    },
    // {
    //   path: '/',
    //   name: 'landing-page',
    //   component: require('@/components/LandingPage').default
    // },
    {
      path: '*',
      redirect: '/'
    },
    {
      path: '/index',
      name: 'index',
      component: require('@/views/index/index').default,
      children: [
        // 主页
        {
          path: '/home',
          name: 'home',
          component: require('@/views/home/index').default
        },
        // 资源管理
        {
          path: '/resource',
          name: 'resource',
          component: require('@/views/resource/index').default
        },
        // 类别管理
        {
          path: '/types',
          name: 'types',
          component: require('@/views/types/index').default
        },
        // 项目管理
        {
          path: '/projects',
          name: 'projects',
          component: require('@/views/projects/index').default
        },
        // 关于
        {
          path: '/about',
          name: 'about',
          component: require('@/views/about/index').default
        }
      ]
    }
  ]
})
